Skip to content

Add linkage attribute to (non-gnu89) inline functions#116

Merged
thedataking merged 3 commits intomasterfrom
feature/inlining_explicit_linkage
Jun 25, 2019
Merged

Add linkage attribute to (non-gnu89) inline functions#116
thedataking merged 3 commits intomasterfrom
feature/inlining_explicit_linkage

Conversation

@thedataking
Copy link
Contributor

This change was prompted by a linker error in bzip2. Using the linkage feature and adding the #[linkage = "external"] attribute to inlined Rust functions (translated from non-gnu89 inlined extern functions) avoids the linker issue. This due to the way rustc handles functions with explicit linkage (see mono.rs).

After additional testing, it does not seem necessary to add a #[linkage = "internal"] attribute on static inlined functions.

@thedataking thedataking requested a review from TheDan64 June 20, 2019 23:38
@thedataking thedataking added the bug Something isn't working label Jun 21, 2019
@thedataking thedataking merged commit 1608ac6 into master Jun 25, 2019
@thedataking thedataking deleted the feature/inlining_explicit_linkage branch June 25, 2019 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants